package com.wuliang.generate.common.core.chain.impl;

import com.wuliang.generate.common.core.chain.RoleChain;
import com.wuliang.generate.common.core.utils.JsonUtils;
import com.wuliang.generate.common.core.utils.JwtTokenUtils;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * 默认的权限链实现
 *
 * @author WuLiang
 */
@Component
public class DefaultRoleChain implements RoleChain {

    /**
     * non-javadoc {@linkplain com.wuliang.generate.common.core.chain.RoleChain#checkChain(String)}
     */
    @Override
    public Boolean checkChain(String token) {
        Map<String, Object> subject = JsonUtils.jsonToMap(JwtTokenUtils.getTokenBody(token).getSubject());

        return false;
    }

}
